import types
from collections.abc import Generator
from pathlib import Path

from _typeshed import Incomplete
from pytest_snapshot._utils import flatten_filesystem_dict as flatten_filesystem_dict
from pytest_snapshot._utils import get_valid_filename as get_valid_filename
from pytest_snapshot._utils import shorten_path as shorten_path

PARAMETRIZED_TEST_REGEX: Incomplete

def pytest_addoption(parser) -> None: ...
def snapshot(request) -> Generator[Incomplete, None, None]: ...

class Snapshot:
    def __init__(self, snapshot_update: bool, allow_snapshot_deletion: bool, snapshot_dir: Path) -> None: ...
    def __enter__(self): ...
    def __exit__(
        self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None
    ) -> None: ...
    @property
    def snapshot_dir(self): ...
    @snapshot_dir.setter
    def snapshot_dir(self, value) -> None: ...
    def assert_match(self, value: str | bytes, snapshot_name: str | Path): ...
    def assert_match_dir(self, dir_dict: dict, snapshot_dir_name: str | Path): ...
